package com.iot08.api.controller;

import com.iot08.api.service.SystemLimitService;
import com.iot08.api.vo.request.SystemLimitAddReqVo;
import com.iot08.api.vo.request.SystemLimitEditReqVo;
import com.iot08.common.utils.response.ResponseMap;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author cwj
 * @description
 * @date 2025/1/8 16:26
 **/
@Slf4j
@RestController
@RequestMapping("getway/systemLimit")
public class SystemLimitController {

    @Resource
    private SystemLimitService systemLimitService;

    /**
     * @description 增加系统限制信息
     * @author cwj
     * @param [vo]
     * @return com.iot08.common.utils.response.ResponseMap
     * @date @time 2025/1/8 16:48
     **/
    @PostMapping("/add")
    public ResponseMap addSystemLimit(@Validated SystemLimitAddReqVo vo){
        return systemLimitService.addSystemLimit(vo);
    }

    /**
     * @description 编辑系统限制信息
     * @author cwj
     * @param [vo]
     * @return com.iot08.common.utils.response.ResponseMap
     * @date @time 2025/1/8 16:49
     **/
    @PostMapping("/edit")
    public ResponseMap editSystemLimit(@Validated SystemLimitEditReqVo vo){
        return systemLimitService.editSystemLimit(vo);
    }


}
